
package iv1201;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.enterprise.context.SessionScoped;
import javax.inject.Named;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

@Named("backingBean")
@SessionScoped
public class backingBean implements Serializable{
    private static final long serialVersionUID = 0x2337L;

    private String firstname = "";
    private String lastname = "";
    private String email = "";
    private String areaofexp = "";
    private BigDecimal years = new BigDecimal(0.0);
    
    @PersistenceContext(unitName = "mypu")
    private EntityManager em;

    /** Creates a new instance of backingBean */
    public backingBean() {
    }
    
    public void send(){
        em.persist(new applicant(firstname, lastname, email));
    }
    
    public void setFirstname(String first) {
        this.firstname = first;
    }
    
    public String getFirstname() {
        return firstname;
    }
    
    public void setLastname(String last) {
        lastname = last;
    }
    
    public String getLastname() {
        return lastname;
    }
    
    public void setEmail(String mail) {
        email = mail;
    }
    
    public String getEmail() {
        return email;
    }
    
    public void setAreaofexp(String exp) {
        areaofexp = exp;
    }
    
    public String getAreaofexp() {
        return email;
    }
    
    public void setYears(String y) {
        years = new BigDecimal(Float.parseFloat(y));
    }
    
    public String getYears() {
        return email;
    }
}
